const mongoose = require('mongoose')
const schema = new mongoose.Schema({
    name: {//名称
        type: String,
        required: true,
        trim: true
    },
    type_id: {
        type: Number,
        required: true,
        // 0、其他 1、jquery 2、javascript 3、vue 4、uniapp 
    },
    classify_one_id: {//一级分类id
        type: mongoose.Types.ObjectId,
        required: true,
    },
    state: {//状态
        type: String,
        default: '1',
        enum: ['0', '1'] //0停用 1 启用
    },
}, { timestamps: { createdAt: 'created', updatedAt: 'updated' } });//更新时间和修改时间
module.exports = mongoose.model('ClassifyTwo', schema, 'classify_two')